<!--
 * @Author: your name
 * @Date: 2021-08-20 16:43:56
 * @LastEditTime: 2021-08-24 16:52:21
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /web-blog/src/components/content/content.vue
-->
<template>
  <div class="box">
    <div class="flex">
      <div>
      <a-affix :offset-top="top">
        <LeftSidebar></LeftSidebar>
      </a-affix>
      </div>
      <div>
        <a-card :bordered="false" :hoverable="true" class="head">
          <div class="headCar">
            <div class="blogTitle">笔记</div>
            <div class="articles">
              共<span>68</span>篇
            </div>
          </div>
        </a-card>
        <a-card :bordered="false" :hoverable="true" class="contentCard">
          <div class="title">入站须知！！</div>
          <div class="contentLeft">
            <div class="contentBox" @click="goContent">
              <!-- 内容 -->
              <div class="remain">如何获取源码地址？入站有什么注意事项？进来便知！</div>
              <div class="contentAvatar">
                <img src="../../assets/img/WechatIMG332.jpeg" class="avatar"/>
                <div class="iconBox">
                  <div class="iconfont icon-chuangjianshijian icon"></div> 2021-08-06 16:00 
                  <div class="iconfont icon-a-icon18fangke icon"></div> 1024 
                  <div class="iconfont icon-pinglun icon"></div> 100
                  <div class="iconfont icon-dianzan_leave icon2"></div> 200
                </div>
              </div>
            </div>
            <div>
              <img src="../../assets/img/WechatIMG332.jpeg" class="contentImg"/>
            </div>
          </div>
        </a-card>
      </div>
      <div>
        <RightSidebar></RightSidebar>
      </div>
    </div>
    <Aplayer></Aplayer>
    <Footer></Footer>
  </div>
</template>

<script>
  import RightSidebar from '../rightSidebar/rightSidebar.vue'
  import LeftSidebar from '../leftSidebar/leftSidebar.vue'
  import Footer from '../footer/footer.vue'
  import Aplayer from '../aplayer/aplayer.vue'

export default {
  components: {
    RightSidebar,
    LeftSidebar,
    Footer,
    Aplayer
  },
  data() {
    return {
      top: 100,
    }
  },
  created() {
    this.openNotification();
  },
  methods: {
    goContent() {
      this.$router.push('/content')
    },

    /**
     * 首页通知
     */
    openNotification() {
      this.$notification.open({
        message: '推送通知',
        description:
          '欢迎来到我的笔记，左侧卡片有微信版笔记和交流群，加群获取源码',
          icon: <a-icon type="smile" style="color: #108ee9" />,
        onClick: () => {
          console.log('Notification Clicked!');
        },
      });
    },
  }
}
</script>

<style lang="less" scoped>
  .box {
    background-color: #f5f5f5;
    padding-top: 80px;
  }

  .flex {
    display: flex;
    padding-left: 40px;
  }

  .head {
    margin-bottom: 6px;
    border-radius: 6px;
    width: 600px;
    height: 50px;
  }

  .headCar {
    display: flex;
    justify-content: space-between;
    margin-top: -14px;
  }

  .articles {
    margin-top: 5px;
  }

  .blogTitle {
    font-size: 22px;
    font-family: 600;
    color: #00B4DB;
  }

  .contentCard {
    // margin-left: 400px;
    margin-bottom: 6px;
    border-radius: 6px;
    width: 600px;
    height: 170px;
  }

  .contentAvatar {
    display: flex;
  }

  .contentLeft {
    display: flex;
  }

  .title {
    font-size: 19px;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    color: #333333;
  }

  .remain {
    font-size: 13px;
    width: 400px;
    margin-top: 20px;
  }

  .bottomContent {
    display: flex;
    width: 400px;
    margin-left: -8px;
    margin-top: 20px;
  }

  .avatar {
    width: 21px;
    height: 21px;
    border-radius: 30px;
  }

  .iconBox {
    display: flex;
    color: #AFB0AF;
    font-size: 13px;
    margin-top: 4px;
    margin-left: -1px
  }

  .icon {
    margin-top: -2px;
    margin-left: 6px;
  }

  .icon2 {
    margin-top: -3px;
    margin-left: 6px;
  }

  .contentImg {
    width: 220px;
    height: 119px;
    border-radius: 10px;
    margin-left: -67px;
    margin-top: -29px;
  }
</style>
